#define _CRT_SECURE_NO_WARNINGS 1
#include<assert.h>
#include<string.h>
#include<stdio.h>
char* my_strncpy(char* dest, const char* src, size_t num)
{
	while (*dest != '\0')
		dest++;
	int i = 0;
	for (i = 0; i < num; i++)
	{
		*dest++ = *src++;
	}
}
int main()
{
	char arr1[20] = { 0 };
	char arr2[] = "abcdefghi";
	//strncpy(arr1, arr2, 3);
	my_strncpy(arr1, arr2, 3);
	printf("%s\n", arr1);
	return 0;
}